<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>认领列表</title>
        <link href="/electriccar/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/electriccar/Public/admin/js/jquery.js"></script> 
        <link href="/electriccar/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/electriccar/Public/admin/js/jquery.idTabs.min.js"></script>
        <script type="text/javascript" src="/electriccar/Public/admin/js/select-ui.min.js"></script> 
        <script type="text/javascript" src="/electriccar/Public/layer/layer.js"></script> 
        <script type="text/javascript" src="/electriccar/Public/My97DatePicker/WdatePicker.js"></script>
        <script type="text/javascript">
            $(document).ready(function (e) {
                $("#red_type").uedSelect({
                    width: 150
                });
            });
            //弹出营销型红包详情
            function show(id, title) {
                layer.open({
                    type: 2,
                    title: title + '的详细信息',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['800px', '520px'],
                    content: '<?php echo U("vehicle/show");?>&id=' + id
                });
            }
        </script>
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="<?php echo U('cardraw/index');?>">认领列表</a></li>
            </ul>
        </div>

        <div class="formbody">                   
            <form name="seachform" id="seachform" action="<?php echo U('cardraw/index');?>" method="post">
                <ul class="seachform">
                    <li><label>用户名查询</label><input name="username" id="keyword" value="<?=I('username')?>" type="text" class="scinput" /></li>
                    <li><label>车辆USIM查询</label><input name="usim" id="keyword" value="<?=I('usim')?>" type="text" class="scinput" /></li>  
                    <li><label></label><input placeholder="起始时间" name="start_time" id="starttime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('start_time')?>" /></li>
                    <li><label></label><input placeholder="截止时间" name="end_time" id="endtime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('end_time')?>" /></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <table class="tablelist">
                <thead>
                    <tr>
                        <th><input name="" type="checkbox" value="" /></th>
                        <th>编号</th>
                        <th>用户</th>
                        <th>车辆USIM</th> 
                        <th>起始电量</th> 
                        <th>完成电量</th> 
                        <th>开始时间</th> 
                        <th>结束时间</th>   
                    </tr>
                </thead>
                <tbody> 
                    <?php if(is_array($model)): $i = 0; $__LIST__ = $model;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr>
                            <td><input name="" type="checkbox" value="" /></td>
                            <td><?php echo ($v["id"]); ?></td>
                            <td><?php echo ($v["username"]); ?></td>
                            <td><?php echo ($v["usim"]); ?></td>   
                            <td><?php echo ($v["start_batery"]); ?></td>   
                            <td><?php echo ($v["end_batery"]); ?></td>   
                            <td><?php echo (date("Y-m-d H:i:s",$v["start_time"])); ?></td>  
                            <td><?php echo (date("Y-m-d H:i:s",$v["end_time"])); ?></td>   
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>

            <?php echo ($pageshow); ?>

        </div>
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </body>

</html>